<%
item_id = @item_id || item_id
active = @active || active
preview = @preview || preview

update = (preview == 1) ? "previewbookmark" : "bookmark#{item_id}"
%>
<%= link_to_remote((active) ? 'unmark' : 'bookmark', :update => update, :url => {:controller => 'resource/items', :action => 'switch_bookmarked', :item_id => item_id, :preview => preview}, :html => {:class => 'bookmark'}) %>
